{%include file="header.html"%}
<style>
input {	width: 120px;}
textarea {	width: 350px;	height: 100px;}
tr {height: 48px; }
th {background-color:#f3f3f3; font-size:18px;}
td {font-size:14px;}
</style>
<body>
  <div class="fixed-bar">
    <div class="item-title">
      <h3>订单操作：生成发货单</h3>
    </div> 
  </div>
  <div class="fixed_bottom">
    <form method="post" action="order.php" enctype="multipart/form-data" id="aspnetForm" name="form1">
	  <div class="list-div" style="margin-bottom: 5px">
	    <table width="100%" cellpadding="3" cellspacing="1">
  		  <tr>
    		  <th colspan="4">基本设置</th>
  		  </tr>
  		  <tr>
    	     <td width="18%"><div align="right"><strong>订单号：</strong></div></td>
   		     <td width="34%">{%$back_order.order_sn%}</td>
    	     <td><div align="right"><strong>下单时间：</strong></div></td>
    	     <td>{%$back_order.add_time|date_format:'%Y-%m-%d %H:%M:%I'%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>购货人：</strong></div></td>
    	     <td>{%if $back_order.user_name==''%}匿名用户{%else%}{%$back_order.user_name%}{%/if%}</td>
    	     <td><div align="right"><strong>缺货处理：</strong></div></td>
    	     <td>{%$back_order.how_oos%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>配送方式：</strong></div></td>
    	     <td>{%$back_order.shipping_name%}</td>
    	     <td><div align="right"><strong>配送费用：</strong></div></td>
    	     <td>{%$back_order.shipping_fee%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>是否保价：</strong></div></td>
    	     <td>{%if $back_order.insure_yn==1%}否{%else%}是{%/if%}</td>
    	     <td><div align="right"><strong>保价费用：</strong></div></td>
    	     <td>{%$back_order.insure_fee|default:0.00%}</td>
  		  </tr>
  		  <tr>
    	     <th colspan="4">收货人信息</th>
    	  </tr>
  		  <tr>
    	     <td><div align="right"><strong>收货人：</strong></div></td>
    	     <td>{%$back_order.consignee|escape%}</td>
    	     <td><div align="right"><strong>电子邮件：</strong></div></td>
    	     <td>{%$back_order.email%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>地址：</strong></div></td>
    	     <td>{%$back_order.region%}{%$back_order.address|escape%}</td>
    	     <td><div align="right"><strong>邮编：</strong></div></td>
    	     <td>{%$back_order.zipcode|escape%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>电话：</strong></div></td>
    	     <td>{%$back_order.tel%}</td>
    	     <td><div align="right"><strong>手机：</strong></div></td>
    	     <td>{%$back_order.mobile|escape%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>标志性建筑：</strong></div></td>
    	     <td>{%$back_order.sign_building|escape%}</td>
    	     <td><div align="right"><strong>最佳送货时间：</strong></div></td>
    	     <td>{%$back_order.best_time|escape%}</td>
  		  </tr>
  		  <tr>
    	     <td><div align="right"><strong>客户给商家的留言：</strong></div></td>
    	     <td colspan="3">{%$back_order.postscript%}</td>
  		  </tr>
	   </table>
    </div>
    <div class="list-div" style="margin-bottom: 5px">
      <table width="100%" cellpadding="3" cellspacing="1">
        <tr>
          <th colspan="8" scope="col">商品信息</th>
        </tr>
        <tr>
          <td><div align="center"><strong>商品名称</strong></div></td>
          <td><div align="center"><strong>货号</strong></div></td>
          <td><div align="center"><strong>属性</strong></div></td>
          <td><div align="center"><strong>库存</strong></div></td>
          <td><div align="center"><strong>数量</strong></div></td>
          <td><div align="center"><strong>已发货数量</strong></div></td>
          <td><div align="center"><strong>此单发货数量</strong></div></td>
        </tr>
        {%foreach from=$goods_list item=goods key=k%}
        <tr>
          <td><div style="text-align:center">{%$goods.goods_name%}</div></td>
          <td><div style="text-align:center">{%$goods.goods_sn%}</div></td>
          <td><div style="text-align:center">{%$goods.goods_attr%}</div></td>
          <td><div style="text-align:center">{%$goods.number%}</div></td>
          <td><div style="text-align:center">{%$goods.goods_number%}</div></td>
          <td><div style="text-align:center">{%$goods.send_number%}</div></td>
          <td><div style="text-align:center"><input type="text" name="send_number" value='{%$goods.send%}'></div></td>
        </tr>
        {%/foreach%}
      </table>
    </div>
      <table width="100%" cellpadding="3" cellspacing="1">
        <tr style="text-align:center">
          <input type="hidden" name="act" value='invoice_add'>
          <input type="hidden" name="order_sn" value='{%$back_order.order_sn%}'>
          <input type="hidden" name="order_id" value='{%$back_order.order_id%}'>
          <input type="hidden" name="add_time" value='{%$back_order.add_time%}'>
          <input type="hidden" name="shipping_id" value='{%$back_order.shipping_id%}'>
          <input type="hidden" name="shipping_name" value='{%$back_order.shipping_name%}'>
          <input type="hidden" name="user_id" value='{%$admin.user_id%}'>
          <input type="hidden" name="user_name" value='{%$admin.user_name%}'>
          <input type="hidden" name="consignee" value='{%$back_order.consignee%}'>
          <input type="hidden" name="address" value='{%$back_order.address%}'>
          <input type="hidden" name="country" value='{%$back_order.country%}'>
          <input type="hidden" name="province" value='{%$back_order.province%}'>
          <input type="hidden" name="city" value='{%$back_order.city%}'>
          <input type="hidden" name="district" value='{%$back_order.district%}'>
          <input type="hidden" name="email" value='{%$back_order.email%}'>
          <input type="hidden" name="tel" value='{%$back_order.tel%}'>
          <input type="hidden" name="how_oos" value='{%$back_order.how_oos%}'>
          <input type="hidden" name="insure_fee" value='{%$back_order.insure_fee%}'>
          <input type="hidden" name="shipping_fee" value='{%$back_order.shipping_fee%}'>
          <input type="hidden" name="shipping_fee" value='{%$back_order.shipping_fee%}'>
          <td class="style1">&nbsp;</td>
          <td><a href="JavaScript:void(0);" class="btn" onclick="$('#tj').click()"><span>确认生成进货单</span></a>
          </td>
        </tr>
      </table>
        <input type="reset" id="cz" style="display: none;">
        <input type="submit" id="tj" style="display:none;";>
    </form>
  </div>
</body>
<script>
   function reset(){
        $('input').val('');
        $('textarea').text('');
    }
</script>